import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import locale from 'element-ui/lib/locale/lang/en'
import App from './App'
const router = require('./router').default
import animated from 'animate.css'
import store from './store'
import '@/icons'
import '@/permission'
import VueQuillEditor from 'vue-quill-editor'
import md5 from 'js-md5'
import echarts from 'echarts'
import VideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
import axios from 'axios'
import { Loading } from 'element-ui'
import Tinymce from 'tinymce'
import VueVideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
// import Print from "vue-print-nb" // 打印功能
// 全局组件
import bus from '@/utils/eventBus'

// 引入全局方法
import { Message } from 'element-ui'
// 注册全局方法
Vue.prototype.$echarts = echarts
Vue.prototype.$tinymce = Tinymce
Vue.prototype.$md5 = md5 // 密码加密
Vue.prototype.$loading = Loading
Vue.prototype.$bus = bus // bus
Vue.prototype.$axios = axios // axios
Vue.prototype.$commonMessage = (text = '操作成功', type = 'success') => {
  Message({
    message: text,
    type: type,
    center: true
  })
}
// require styles 引入样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import './../static/noData/no_data.scss'  // table中无数据的样式
import './../static/noData/loading.css'  // loading样式
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')

// 英文
// Vue.use(ElementUI, { locale })
// 中文
Vue.use(ElementUI)
Vue.use(VueVideoPlayer, /* {
  options: global default options,
  events: global videojs events
} */)
Vue.use(VueQuillEditor)
Vue.use(animated)
// Vue.use(Print)
Vue.use(VideoPlayer)

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})
